package com.swing.games.snake.pages;

import javax.swing.*;
import java.awt.*;

/**
 * @author Yuang, Gongming
 * @date 2022-02-23 16:04
 */
public class DiagramPage extends JPanel implements IDiagramPage{

    private static DiagramPage diagram;

    private DiagramPage(){}

    public static DiagramPage init(){
        if(diagram == null){
            synchronized (DiagramPage.class){
                if(diagram == null){
                    diagram = new DiagramPage();
                    diagram.settings();
                }
            }
        }
        return diagram;
    }


    @Override
    public void settings() {
        diagram.setLayout(new CardLayout());
        System.out.println(diagram.btn1);
    }


}
